import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: resolve => require(['../components/page/Dashboard.vue'], resolve),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/mymerchants',
                    component: resolve => require(['../components/page/mymerchants.vue'], resolve),
                    meta: { title: '我的商户' }
                },
                {
                    path: '/merchantsinfo',
                    component: resolve => require(['../components/page/merchantsinfo.vue'], resolve),
                    meta: { title: '商户详情' }
                },
                {
                    path: '/stores',
                    component: resolve => require(['../components/page/stores.vue'], resolve),
                    meta: { title: '我的门店' }
                },
                {
                    path: '/storesinfo',
                    component: resolve => require(['../components/page/storesinfo.vue'], resolve),
                    meta: { title: '门店详情' }
                },
                {
                    path: '/userinfo',
                    component: resolve => require(['../components/page/userinfo.vue'], resolve),
                    meta: { title: '用户信息' }
                },
                {
                    path: '/refresh',
                    component: resolve => require(['../components/page/refresh.vue'], resolve),
                    meta: { title: '刷新' }
                },
                {
                    path: '/channel',
                    component: resolve => require(['../components/page/channel.vue'], resolve),
                    meta: { title: '机构管理' }
                },
                {
                    path: '/audit',
                    component: resolve => require(['../components/page/audit.vue'], resolve),
                    meta: { title: '退款审核' }
                },
                {
                    path: '/auditdetails',
                    component: resolve => require(['../components/page/auditdetails.vue'], resolve),
                    meta: { title: '审核' }
                },
                {
                    path: '/serviceproviders',
                    component: resolve => require(['../components/page/serviceproviders.vue'], resolve),
                    meta: { title: '服务商' }
                },
                {
                    path: '/serviceprovidersinfo',
                    component: resolve => require(['../components/page/serviceprovidersinfo.vue'], resolve),
                    meta: { title: '服务商详情' }
                },
                {
                    path: '/bdlist',
                    component: resolve => require(['../components/page/bdlist.vue'], resolve),
                    meta: { title: '业态' }
                },
                {
                    path: '/account',
                    component: resolve => require(['../components/page/account.vue'], resolve),
                    meta: { title: '账号管理' }
                },
                {
                    path: '/bdinfo',
                    component: resolve => require(['../components/page/bdinfo.vue'], resolve),
                    meta: { title: '业态详情' }
                },
                {
                    path: '/indent',
                    component: resolve => require(['../components/page/indent.vue'], resolve),
                    meta: { title: '全部订单' }
                },
                {
                    path: '/businessstatistics',
                    component: resolve => require(['../components/page/businessstatistics.vue'], resolve),
                    meta: { title: '商户交易统计' }
                },
                {
                    path: '/businessstatisticsinfo',
                    component: resolve => require(['../components/page/businessstatisticsinfo.vue'], resolve),
                    meta: { title: '商户统计详情' }
                },
                {
                    path: '/servicedealTransactionDetails',
                    component: resolve => require(['../components/page/servicedealTransactionDetails.vue'], resolve),
                    meta: { title: '服务商交易统计详情' }
                },
                {
                    path: '/storestrading',
                    component: resolve => require(['../components/page/storestrading.vue'], resolve),
                    meta: { title: '门店日结' }
                },
                {
                    path: '/storestradings',
                    component: resolve => require(['../components/page/storestradings.vue'], resolve),
                    meta: { title: '门店交易统计' }
                },
                {
                    path: '/servicedeal',
                    component: resolve => require(['../components/page/servicedeal.vue'], resolve),
                    meta: { title: '服务商交易统计' }
                },
                {
                    path: '/sharestats',
                    component: resolve => require(['../components/page/sharestats.vue'], resolve),
                    meta: { title: '分润统计' }
                },
                {
                    path: '/bankcurtain',
                    component: resolve => require(['../components/page/bankcurtain.vue'], resolve),
                    meta: { title: '银行到账查询' }
                },
                {
                    path: '/clearingcurtain',
                    component: resolve => require(['../components/page/clearingcurtain.vue'], resolve),
                    meta: { title: '清算查询' }
                },
                {
                    path: '/eqcode',
                    component: resolve => require(['../components/page/eqcode.vue'], resolve),
                    meta: { title: '二维码管理' }
                },
                {
                    path: '/terminal',
                    component: resolve => require(['../components/page/terminal.vue'], resolve),
                    meta: { title: '终端管理' }
                },
                {
                    path: '/facility',
                    component: resolve => require(['../components/page/facility.vue'], resolve),
                    meta: { title: '设备管理' }
                },
                {
                    path: '/Inventory',
                    component: resolve => require(['../components/page/Inventory.vue'], resolve),
                    meta: { title: '库存管理' }
                },
                {
                    path: '/system',
                    component: resolve => require(['../components/page/system.vue'], resolve),
                    meta: { title: '系统菜单', permission: true }
                },
                {
                    path: '/role',
                    component: resolve => require(['../components/page/role.vue'], resolve),
                    meta: { title: '角色管理' }
                },
                {
                    path: '/oemrole',
                    component: resolve => require(['../components/page/oemrole.vue'], resolve),
                    meta: { title: 'oem菜单配置' }
                },
                {
                    path: '/log',
                    component: resolve => require(['../components/page/log.vue'], resolve),
                    meta: { title: '日志管理' }
                },
                {
                    path: '/labelManagement',
                    component: resolve => require(['../components/page/labelManagement.vue'], resolve),
                    meta: { title: '标签管理' }
                },
                {
                    path: '/labelDetails',
                    component: resolve => require(['../components/page/labelDetails.vue'], resolve),
                    meta: { title: '标签详情' }
                },
                {
                    path: '/indentdetails',
                    component: resolve => require(['../components/page/indentdetails.vue'], resolve),
                    meta: { title: '订单详情' }
                },
                {
                    path: '/addmerchants',
                    component: resolve => require(['../components/page/addmerchants.vue'], resolve),
                    meta: { title: '新增商户' }
                },
                {
                    path: '/loanProducts',
                    component: resolve => require(['../components/page/loanProducts.vue'], resolve),
                    meta: { title: '选择产品' } //极速云 选择产品页
                },
                {
                    path: '/reimbursementList',
                    component: resolve => require(['../components/page/reimbursementList.vue'], resolve),
                    meta: { title: '还款列表' } //极速云 还款列表
                },
                {
                    path: '/messageList',
                    component: resolve => require(['../components/page/messageList.vue'], resolve),
                    meta: { title: '消息列表' } //极速云 消息列表
                },
                {
                    path: '/borrowingRecord',
                    component: resolve => require(['../components/page/borrowingRecord.vue'], resolve),
                    meta: { title: '借款记录' } //极速云 借款记录
                },
                {
                    path: '/auditrejectionlist',
                    component: resolve => require(['../components/page/auditrejectionlist.vue'], resolve),
                    meta: { title: '审核驳回列表' } //审核驳回列表
                },
                {
                    path: '/altermerchants',
                    component: resolve => require(['../components/page/altermerchants.vue'], resolve),
                    meta: { title: '修改商户' } //修改商户
                },
                {
                    path: '/addmerdetails',
                    component: resolve => require(['../components/page/addmerdetails.vue'], resolve),
                    meta: { title: '详情' } //进件详情
                },
                {
                    path: '/Advertisinglist',
                    component: resolve => require(['../components/page/Advertisinglist.vue'], resolve),
                    meta: { title: '广告管理' } //广告管理
                },
                {
                    path: '/AdvertisingMaterial',
                    component: resolve => require(['../components/page/AdvertisingMaterial.vue'], resolve),
                    meta: { title: '广告素材' } //广告素材
                },
                {
                    path: '/oemset',
                    component: resolve => require(['../components/page/oemset.vue'], resolve),
                    meta: { title: '平台配置' } //平台配置
                },
                {
                    path: '/recharge',
                    component: resolve => require(['../components/page/recharge.vue'], resolve),
                    meta: { title: '充值' } //充值
                },
                {
                    path: '/channeldetails',
                    component: resolve => require(['../components/page/channeldetails.vue'], resolve),
                    meta: { title: '机构详情' } //机构详情
                },
                {
                    path: '/goodsmanagement',
                    component: resolve => require(['../components/page/goodsmanagement.vue'], resolve),
                    meta: { title: '商品详情' } //商品详情
                },
                {
                    path: '/goodsentry',
                    component: resolve => require(['../components/page/goodsentry.vue'], resolve),
                    meta: { title: '商品录入' } //商品录入
                },
                {
                    path: '/rentalbill',
                    component: resolve => require(['../components/page/rentalbill.vue'], resolve),
                    meta: { title: '租赁账单' } //租赁账单
                },
                {
                    path: '/orderdetails',
                    component: resolve => require(['../components/page/orderdetails.vue'], resolve),
                    meta: { title: '订单详情' } //订单详情
                },
                {
                    path: '/goodsorder',
                    component: resolve => require(['../components/page/goodsorder.vue'], resolve),
                    meta: { title: '商品订单' } //商品订单
                },
                {
                    path: '/bill',
                    component: resolve => require(['../components/page/bill.vue'], resolve),
                    meta: { title: '对账单' } //对账单
                },
                {
                    path: '/timingtask',
                    component: resolve => require(['../components/page/timingtask.vue'], resolve),
                    meta: { title: '定时任务' } //定时任务
                },
                {
                    path: '/bdtradestatistics',
                    component: resolve => require(['../components/page/bdtradestatistics.vue'], resolve),
                    meta: { title: '业态交易统计' } //定时任务
                },
                {
                    path: '/exportlist',
                    component: resolve => require(['../components/page/exportlist.vue'], resolve),
                    meta: { title: '导出列表' } //导出列表
                },
                {
                    path: '/exportZhongxin',
                    component: resolve => require(['../components/page/exportzhognxin.vue'], resolve),
                    meta: { title: '中信账单列表' }
                },
                {
                    path: '/exportChayi',
                    component: resolve => require(['../components/page/exportchayi.vue'], resolve),
                    meta: { title: '中信账单列表' }
                },
                {
                    path: '/capital',
                    component: resolve => require(['../components/page/capital.vue'], resolve),
                    meta: { title: '资金管理' } //资金管理
                },
                {
                    path: '/withdraw',
                    component: resolve => require(['../components/page/withdraw.vue'], resolve),
                    meta: { title: '提现明细' } //提现明细
                },
                {
                    path: '/recorded',
                    component: resolve => require(['../components/page/recorded.vue'], resolve),
                    meta: { title: '入账明细' } //入账明细
                },
                {
                    path: '/addmerchantss',
                    component: resolve => require(['../components/page/addmerchantss.vue'], resolve),
                    meta: { title: '新增商户' } //新增商户
                },







                {
                    path: '/icon',
                    component: resolve => require(['../components/page/Icon.vue'], resolve),
                    meta: { title: '自定义图标' }
                },
                {
                    path: '/table',
                    component: resolve => require(['../components/page/BaseTable.vue'], resolve),
                    meta: { title: '基础表格' }
                },
                {
                    path: '/tabs',
                    component: resolve => require(['../components/page/Tabs.vue'], resolve),
                    meta: { title: 'tab选项卡' }
                },

                {
                    // 富文本编辑器组件
                    path: '/editor',
                    component: resolve => require(['../components/page/VueEditor.vue'], resolve),
                    meta: { title: '富文本编辑器' }
                },
                {
                    // markdown组件
                    path: '/markdown',
                    component: resolve => require(['../components/page/Markdown.vue'], resolve),
                    meta: { title: 'markdown编辑器' }
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: resolve => require(['../components/page/Upload.vue'], resolve),
                    meta: { title: '文件上传' }
                },
                {
                    // vue-schart组件
                    path: '/charts',
                    component: resolve => require(['../components/page/BaseCharts.vue'], resolve),
                    meta: { title: 'schart图表' }
                },
                {
                    // 拖拽列表组件
                    path: '/drag',
                    component: resolve => require(['../components/page/DragList.vue'], resolve),
                    meta: { title: '拖拽列表' }
                },
                {
                    // 拖拽Dialog组件
                    path: '/dialog',
                    component: resolve => require(['../components/page/DragDialog.vue'], resolve),
                    meta: { title: '拖拽弹框' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: resolve => require(['../components/page/Permission.vue'], resolve),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    // 验证码组件
                    path: '/identify',
                    component: resolve => require(['../components/page/identify.vue'], resolve),
                    meta: { title: '验证码', }
                },
                {
                    path: '/404',
                    component: resolve => require(['../components/page/404.vue'], resolve),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: resolve => require(['../components/page/403.vue'], resolve),
                    meta: { title: '403' }
                }

            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },
        {
            path: '/forgetpassword',
            component: resolve => require(['../components/page/forgetpassword.vue'], resolve)
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})
